package webapp.controller;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import webapp.mapper.DemoMapper;
import webapp.service.CommService;

import java.util.List;

@RestController
public class FirstController {

    @Autowired
    private List<CommService> commServices;

//    @Resource
//    private DemoMapper demoMapper;

    @GetMapping("/hello/{checkCode}")
    public void hello(@PathVariable String checkCode){
        for (CommService service : commServices) {
            if(service.checkCode(checkCode)){
                service.doSomething();
            }
        }

//        System.out.println(demoMapper.toString());
    }

//    private <T> T xml2Obj(String xmlPath, Class<T> clazz) {
//    }
}
